<template>
  <div>
    <app-header v-show="$store.state.bNav"/>
	<!-- <AppHeader/> -->
	<router-view></router-view>
	<Footer v-show="$store.state.bFoot"/>
  </div>
</template>

<script>
	import AppHeader from '../components/header.vue'
	import Footer from '../components/footer.vue'
	import home from '../pages/home.vue'
	// import SkeletonScreen from '../components/SkeletionScreen.vue'
  export default {
    name:'app',
    props:{},
  
    components:{
		AppHeader,Footer,home,
		// SkeletonScreen
	},
	watch:{
		$route(val){
			let path=val.path;
			let path2=val.meta.path
			if(/home|follow|column|video|life|economic|question/.test(path)){
				this.$store.commit('bNav',true)
				this.$store.commit('bFoot',true)
			}
			if(/login|reg/.test(path)|| /detail/.test(path2)){
				this.$store.commit('bNav',false)
				this.$store.commit('bFoot',false)
			} 
			if(path.includes('user')){
				this.$store.commit('bNav',false)
			this.$store.commit('bFoot',true)
			}
		}
	},
    mounted(){},
    updated(){},
    methods:{},
    computed: {
    }
  }
</script>

<style scoped>
  .app{}
</style>

